<?php
namespace app\index\service;

class ContractService extends CommonService
{
    public function get_contract_yeararr(){
        $arr = [];
        for ($i=date("Y"); $i>=date("Y")-9; $i--){
            $arr[] = $i;
        }
        return $arr;
    }
    public function get_contract_shi_state(){
        return ['已签订', '未签订'];
    }
    public function get_contract_shi_jie_jietype(){
        return ['进度结算', '最终结算'];
    }
    public function get_contract_cai_caitype(){
        return [
            'cai'=>'材料',
            'ren'=>'人工',
            'ji'=>'机械设备',
            'fen'=>'专业分包',
            'qi'=>'其他',
        ];
    }
    public function get_contract_cai_caitype_name($caitype){
        $arr = $this->get_contract_cai_caitype();
        return isset($arr[$caitype]) ? $arr[$caitype] : '';
    }
    public function get_contract_cai_caishu(){
        return ['总价合同', '固定单价合同'];
    }
    public function get_contract_buy_buytype(){
        return [
            'cai'=>'材料',
            'ren'=>'人工',
            'ji'=>'机械设备',
            'fen'=>'专业分包',
            'qi'=>'其他',
        ];
    }
    public function get_contract_buy_buytype_name($buytype){
        $arr = $this->get_contract_buy_buytype();
        return isset($arr[$buytype]) ? $arr[$buytype] : '';
    }




















}
